Optimal. Leaf size=317 \[ \frac {(1015 A-363 B) \text {ArcTan}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {\cos (c+d x)} \sqrt {a+a \cos (c+d x)}}\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}}{64 \sqrt {2} a^{7/2} d}-\frac {(1887 A-691 B) \sqrt {\sec (c+d x)} \sin (c+d x)}{192 a^3 d \sqrt {a+a \cos (c+d x)}}-\frac {(A-B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{6 d (a+a \cos (c+d x))^{7/2}}-\frac {(23 A-11 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{48 a d (a+a \cos (c+d x))^{5/2}}-\frac {(109 A-41 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{64 a^2 d (a+a \cos (c+d x))^{3/2}}+\frac {(579 A-199 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{192 a^3 d \sqrt {a+a \cos (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.72, antiderivative size = 317, normalized size of antiderivative = 1.00, number of steps
used = 9, number of rules used = 6, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.171, Rules used = {3040, 3057,
3063, 12, 2861, 211} \begin {gather*} \frac {(1015 A-363 B) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} \text {ArcTan}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {\cos (c+d x)} \sqrt {a \cos (c+d x)+a}}\right )}{64 \sqrt {2} a^{7/2} d}+\frac {(579 A-199 B) \sin (c+d x) \sec ^{\frac {3}{2}}(c+d x)}{192 a^3 d \sqrt {a \cos (c+d x)+a}}-\frac {(1887 A-691 B) \sin (c+d x) \sqrt {\sec (c+d x)}}{192 a^3 d \sqrt {a \cos (c+d x)+a}}-\frac {(109 A-41 B) \sin (c+d x) \sec ^{\frac {3}{2}}(c+d x)}{64 a^2 d (a \cos (c+d x)+a)^{3/2}}-\frac {(23 A-11 B) \sin (c+d x) \sec ^{\frac {3}{2}}(c+d x)}{48 a d (a \cos (c+d x)+a)^{5/2}}-\frac {(A-B) \sin (c+d x) \sec ^{\frac {3}{2}}(c+d x)}{6 d (a \cos (c+d x)+a)^{7/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 211
Rule 2861
Rule 3040
Rule 3057
Rule 3063
Rubi steps
\begin {align*} \int \frac {(A+B \cos (c+d x)) \sec ^{\frac {5}{2}}(c+d x)}{(a+a \cos (c+d x))^{7/2}} \, dx &=\left (\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {A+B \cos (c+d x)}{\cos ^{\frac {5}{2}}(c+d x) (a+a \cos (c+d x))^{7/2}} \, dx\\ &=-\frac {(A-B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{6 d (a+a \cos (c+d x))^{7/2}}+\frac {\left (\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\frac {3}{2} a (5 A-B)-4 a (A-B) \cos (c+d x)}{\cos ^{\frac {5}{2}}(c+d x) (a+a \cos (c+d x))^{5/2}} \, dx}{6 a^2}\\ &=-\frac {(A-B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{6 d (a+a \cos (c+d x))^{7/2}}-\frac {(23 A-11 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{48 a d (a+a \cos (c+d x))^{5/2}}+\frac {\left (\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\frac {3}{4} a^2 (63 A-19 B)-\frac {3}{2} a^2 (23 A-11 B) \cos (c+d x)}{\cos ^{\frac {5}{2}}(c+d x) (a+a \cos (c+d x))^{3/2}} \, dx}{24 a^4}\\ &=-\frac {(A-B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{6 d (a+a \cos (c+d x))^{7/2}}-\frac {(23 A-11 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{48 a d (a+a \cos (c+d x))^{5/2}}-\frac {(109 A-41 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{64 a^2 d (a+a \cos (c+d x))^{3/2}}+\frac {\left (\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\frac {3}{8} a^3 (579 A-199 B)-\frac {3}{2} a^3 (109 A-41 B) \cos (c+d x)}{\cos ^{\frac {5}{2}}(c+d x) \sqrt {a+a \cos (c+d x)}} \, dx}{48 a^6}\\ &=-\frac {(A-B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{6 d (a+a \cos (c+d x))^{7/2}}-\frac {(23 A-11 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{48 a d (a+a \cos (c+d x))^{5/2}}-\frac {(109 A-41 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{64 a^2 d (a+a \cos (c+d x))^{3/2}}+\frac {(579 A-199 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{192 a^3 d \sqrt {a+a \cos (c+d x)}}+\frac {\left (\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {-\frac {3}{16} a^4 (1887 A-691 B)+\frac {3}{8} a^4 (579 A-199 B) \cos (c+d x)}{\cos ^{\frac {3}{2}}(c+d x) \sqrt {a+a \cos (c+d x)}} \, dx}{72 a^7}\\ &=-\frac {(1887 A-691 B) \sqrt {\sec (c+d x)} \sin (c+d x)}{192 a^3 d \sqrt {a+a \cos (c+d x)}}-\frac {(A-B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{6 d (a+a \cos (c+d x))^{7/2}}-\frac {(23 A-11 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{48 a d (a+a \cos (c+d x))^{5/2}}-\frac {(109 A-41 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{64 a^2 d (a+a \cos (c+d x))^{3/2}}+\frac {(579 A-199 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{192 a^3 d \sqrt {a+a \cos (c+d x)}}+\frac {\left (\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {9 a^5 (1015 A-363 B)}{32 \sqrt {\cos (c+d x)} \sqrt {a+a \cos (c+d x)}} \, dx}{36 a^8}\\ &=-\frac {(1887 A-691 B) \sqrt {\sec (c+d x)} \sin (c+d x)}{192 a^3 d \sqrt {a+a \cos (c+d x)}}-\frac {(A-B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{6 d (a+a \cos (c+d x))^{7/2}}-\frac {(23 A-11 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{48 a d (a+a \cos (c+d x))^{5/2}}-\frac {(109 A-41 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{64 a^2 d (a+a \cos (c+d x))^{3/2}}+\frac {(579 A-199 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{192 a^3 d \sqrt {a+a \cos (c+d x)}}+\frac {\left ((1015 A-363 B) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sqrt {\cos (c+d x)} \sqrt {a+a \cos (c+d x)}} \, dx}{128 a^3}\\ &=-\frac {(1887 A-691 B) \sqrt {\sec (c+d x)} \sin (c+d x)}{192 a^3 d \sqrt {a+a \cos (c+d x)}}-\frac {(A-B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{6 d (a+a \cos (c+d x))^{7/2}}-\frac {(23 A-11 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{48 a d (a+a \cos (c+d x))^{5/2}}-\frac {(109 A-41 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{64 a^2 d (a+a \cos (c+d x))^{3/2}}+\frac {(579 A-199 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{192 a^3 d \sqrt {a+a \cos (c+d x)}}-\frac {\left ((1015 A-363 B) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \text {Subst}\left (\int \frac {1}{2 a^2+a x^2} \, dx,x,-\frac {a \sin (c+d x)}{\sqrt {\cos (c+d x)} \sqrt {a+a \cos (c+d x)}}\right )}{64 a^2 d}\\ &=\frac {(1015 A-363 B) \tan ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {\cos (c+d x)} \sqrt {a+a \cos (c+d x)}}\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}}{64 \sqrt {2} a^{7/2} d}-\frac {(1887 A-691 B) \sqrt {\sec (c+d x)} \sin (c+d x)}{192 a^3 d \sqrt {a+a \cos (c+d x)}}-\frac {(A-B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{6 d (a+a \cos (c+d x))^{7/2}}-\frac {(23 A-11 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{48 a d (a+a \cos (c+d x))^{5/2}}-\frac {(109 A-41 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{64 a^2 d (a+a \cos (c+d x))^{3/2}}+\frac {(579 A-199 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{192 a^3 d \sqrt {a+a \cos (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 5.03, size = 267, normalized size = 0.84 \begin {gather*} \frac {\cos ^7\left (\frac {1}{2} (c+d x)\right ) \left (\frac {i (1015 A-363 B) e^{-\frac {1}{2} i (c+d x)} \sqrt {\frac {e^{i (c+d x)}}{1+e^{2 i (c+d x)}}} \sqrt {1+e^{2 i (c+d x)}} \tanh ^{-1}\left (\frac {1-e^{i (c+d x)}}{\sqrt {2} \sqrt {1+e^{2 i (c+d x)}}}\right )}{d}-\frac {(21641 A-8469 B+4 (9415 A-3579 B) \cos (c+d x)+8 (3069 A-1145 B) \cos (2 (c+d x))+10164 A \cos (3 (c+d x))-3748 B \cos (3 (c+d x))+1887 A \cos (4 (c+d x))-691 B \cos (4 (c+d x))) \sec ^5\left (\frac {1}{2} (c+d x)\right ) \sec ^{\frac {3}{2}}(c+d x) \tan \left (\frac {1}{2} (c+d x)\right )}{96 d}\right )}{8 (a (1+\cos (c+d x)))^{7/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(728\) vs.
\(2(270)=540\).
time = 0.51, size = 729, normalized size = 2.30
method | result | size |
default | \(\frac {\left (-1+\cos \left (d x +c \right )\right ) \left (3045 A \left (\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {3}{2}} \left (\cos ^{4}\left (d x +c \right )\right ) \sin \left (d x +c \right ) \arcsin \left (\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}\right )-1089 B \left (\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {3}{2}} \left (\cos ^{4}\left (d x +c \right )\right ) \sin \left (d x +c \right ) \arcsin \left (\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}\right )+12180 A \left (\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {3}{2}} \arcsin \left (\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}\right ) \left (\cos ^{3}\left (d x +c \right )\right ) \sin \left (d x +c \right )-4356 B \left (\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {3}{2}} \arcsin \left (\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}\right ) \left (\cos ^{3}\left (d x +c \right )\right ) \sin \left (d x +c \right )+18270 A \arcsin \left (\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}\right ) \left (\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {3}{2}} \left (\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )-6534 B \arcsin \left (\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}\right ) \left (\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {3}{2}} \left (\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )+12180 A \arcsin \left (\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}\right ) \left (\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {3}{2}} \cos \left (d x +c \right ) \sin \left (d x +c \right )-1887 A \left (\cos ^{5}\left (d x +c \right )\right ) \sqrt {2}-4356 B \arcsin \left (\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}\right ) \left (\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {3}{2}} \cos \left (d x +c \right ) \sin \left (d x +c \right )+691 B \left (\cos ^{5}\left (d x +c \right )\right ) \sqrt {2}+3045 A \arcsin \left (\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}\right ) \left (\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {3}{2}} \sin \left (d x +c \right )-3195 A \left (\cos ^{4}\left (d x +c \right )\right ) \sqrt {2}-1089 B \arcsin \left (\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}\right ) \left (\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {3}{2}} \sin \left (d x +c \right )+1183 B \left (\cos ^{4}\left (d x +c \right )\right ) \sqrt {2}+831 A \left (\cos ^{3}\left (d x +c \right )\right ) \sqrt {2}-275 B \left (\cos ^{3}\left (d x +c \right )\right ) \sqrt {2}+3355 A \left (\cos ^{2}\left (d x +c \right )\right ) \sqrt {2}-1215 B \left (\cos ^{2}\left (d x +c \right )\right ) \sqrt {2}+1024 A \cos \left (d x +c \right ) \sqrt {2}-384 B \cos \left (d x +c \right ) \sqrt {2}-128 A \sqrt {2}\right ) \cos \left (d x +c \right ) \left (\frac {1}{\cos \left (d x +c \right )}\right )^{\frac {5}{2}} \sqrt {a \left (1+\cos \left (d x +c \right )\right )}\, \sqrt {2}}{384 d \sin \left (d x +c \right )^{3} \left (1+\cos \left (d x +c \right )\right )^{2} a^{4}}\) | \(729\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.45, size = 295, normalized size = 0.93 \begin {gather*} -\frac {3 \, \sqrt {2} {\left ({\left (1015 \, A - 363 \, B\right )} \cos \left (d x + c\right )^{5} + 4 \, {\left (1015 \, A - 363 \, B\right )} \cos \left (d x + c\right )^{4} + 6 \, {\left (1015 \, A - 363 \, B\right )} \cos \left (d x + c\right )^{3} + 4 \, {\left (1015 \, A - 363 \, B\right )} \cos \left (d x + c\right )^{2} + {\left (1015 \, A - 363 \, B\right )} \cos \left (d x + c\right )\right )} \sqrt {a} \arctan \left (\frac {\sqrt {2} \sqrt {a \cos \left (d x + c\right ) + a} \sqrt {\cos \left (d x + c\right )}}{\sqrt {a} \sin \left (d x + c\right )}\right ) + \frac {2 \, {\left ({\left (1887 \, A - 691 \, B\right )} \cos \left (d x + c\right )^{4} + 2 \, {\left (2541 \, A - 937 \, B\right )} \cos \left (d x + c\right )^{3} + 39 \, {\left (109 \, A - 41 \, B\right )} \cos \left (d x + c\right )^{2} + 128 \, {\left (7 \, A - 3 \, B\right )} \cos \left (d x + c\right ) - 128 \, A\right )} \sqrt {a \cos \left (d x + c\right ) + a} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}}}{384 \, {\left (a^{4} d \cos \left (d x + c\right )^{5} + 4 \, a^{4} d \cos \left (d x + c\right )^{4} + 6 \, a^{4} d \cos \left (d x + c\right )^{3} + 4 \, a^{4} d \cos \left (d x + c\right )^{2} + a^{4} d \cos \left (d x + c\right )\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\left (A+B\,\cos \left (c+d\,x\right )\right )\,{\left (\frac {1}{\cos \left (c+d\,x\right )}\right )}^{5/2}}{{\left (a+a\,\cos \left (c+d\,x\right )\right )}^{7/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________